﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AUV5.Web.Testing
{
    public partial class PasswordModify : PageBaseFrontend
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void imgbtnSave1_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                Model.UserInfo user = base.VerifiedInfo.User;
                if (user != null)
                {
                    //string oldPwd = base.EncryptMD5(txbOldPwd.Text.Trim());
                    //if (oldPwd != user.Password)
                    //{
                    //    lblMessage.Text = "您输入的密码有误";
                    //    divChange.Attributes["style"] = "display:block";
                    //    return;
                    //}
                    //else
                    //    user.Password = base.EncryptMD5(txbRePassword.Text.Trim());
                    ////更新信息
                    //if (BLL.UserInfoBLL.Instance.Update(user) == 1)
                    //{
                    //    base.Alert("密码修改成功");
                    //    //base.AlertGo("密码修改成功", "UserProfile.aspx");
                    //    //hfIsChange.Value = "no";
                    //}
                    //else
                    //    base.AlertGo("修改失败", "UserProfile.aspx");

                    //divChange.Attributes["style"] = "display:none";
                }
                else
                {
                    AlertGo("请登录", "Index.aspx");
                }
            }
            catch (Exception)
            {

                throw;
            }
            finally
            {

            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {

        }

        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                if (base.IsVerified)
                {
                    Model.UserInfo user = base.VerifiedInfo.User;
                }
                else
                {
                    Response.Write(12312);
                }
            }
            catch (Exception)
            {

                throw;
            }
            finally
            {

            }
        }
    }
}